TAMING, TROUBLESHOOTING, AND TURBOCHARGING 
WINDOWS HARDWARE

WHEN WINDOWS GETS ACCUSED OF BEING SLOW, HARDWARE INADEQUACIES or conflicts are usually the true cause. Even when Windows is running "well," sophisticated manipulation of hardware can turbocharge performance to achieve the maximum benefit for the user.
      Nowhere is this more true than when you have to work with Windows on a 286 PC. Conventional wisdom says it simply isn't worth doing. Au contraire. Properly tuned, a 286 PC can handle Windows chores just fine, as we'll demonstrate in this chapter.
      The chapter also delves into the mysteries of BIOS, buffers, ports, and drives. But most of all, this chapter focuses on memory. If the key to retail success is location, location, location, the key to Windows success is memory, memory, memory. And we look into the particular problems of multimedia hardware and notebooks, environments that challenge Windows in very different ways.
      Windows is high-octane software. This chapter is a tune-up.

Optimizing Windows on a 286 PC
Nowhere does savvy manipulation of hardware have greater impact than with 286 PCs. The myth has evolved that Windows simply will not operate on 286 PCs. The reality is that you can run Windows on a 286 PC. The key to accomplishing this goal is to recognize that there is more to your PC than just its processor. Without doubt, the 286 is a weak processor for handling Windows chores. But clever tinkering with memory, drives, and screens can mask many of these limitations. These are the secrets we'll divulge in this section.
      However, where Windows and 286 PCs are concerned, it's wise to remain realistic. It's true, for instance, that if you're in the market for a new system you shouldn't consider anything less than a 386SX for solid Windows performance. The price difference between 286 and 386SX systems today is so small as to be of little note, and you get a lot for that extra money. No matter what you do, some Windows programs just won't run well on a 286 because they need more processor horsepower. In addition, a 286 can't run Windows in 386 Enhanced mode, which supports background processing and lets DOS applications run in graphical windows.
      But a 286 will let you display more than one Windows program at a time, so that you can switch between them with one click of your mouse. And, although DOS applications occupy the entire screen on a 286 when they're active, you can load several DOS and Windows programs at once and switch among them with a few keystrokes.

Beef Up Your RAM
The first step to making your 286 machine Windows-worthy is to add more RAM. Windows has an insatiable appetite for memory. The Program Manager may report that there are lots of kilobytes free, but that's because Windows swaps program code it doesn't immediately need to disk when it loads or switches applications. If you find yourself looking at the clock waiting for a pull-down menu to appear, Windows is looking for that part of the program on your hard disk.
      You may not think you need more memory, but you do. Nothing makes Windows run better than adding 1, 2, or 3 additional megabytes of RAM. If you've got a 1Mb 286, add another megabyte. If your system has 2Mb, go for 4Mb or more. Memory costs so little there's really no excuse for having too little in your system.
      Adding more memory doesn't just make your programs run faster, it helps you do more. Although Windows doesn't really multitask on a 286, it can keep two or more programs in memory at the same time. But with less than 2Mb of memory, you probably won't be able to keep entire programs in RAM. Once your machine's RAM is used up, Windows will swap the program code you're not using to disk. As a result, switching from one program to another may take nearly as long as exiting the first and starting the second. With more memory, you'll spend less time waiting and more time working.

Add the Right Kind of RAM
For you to get the most out of Windows, your system must contain a good-sized chunk of extended memory. If you don't have any extra memory yet, add or replace the memory on your motherboard. Not only is this usually the cheapest option, but it generally provides slightly better performance than using add-in memory cards. Adding motherboard memory has become rather simple these days. The RAM comes in plug-in chips called SIMMs that you can buy in any computer or electronics store. These memory modules come in two different formats and several different speeds. Check your PC's documentation for the specs you need to meet. Once you buy the RAM, you simply plug it into open RAM slots, following the order specified in your documentation.
      If your motherboard doesnt have any memory-expansion capability, you can still get more memory for your 286 by installing a memory add-in board, such as the Intel AboveBoard. These boards contain their own RAM, plug into slots on your PC's motherboard, and are generally used to provide expanded memory, but they can be set up to provide extended memory instead.

Set Up a Disk Cache According to the Applications You Use
Adding more RAM helps you get better performance, but only if you use it properly. That means setting up a disk cache that is the right size for your applications. Windows automatically installs a cache (SMARTDrive) when you run the Setup program, but Setup usually picks a size that's a compromise for all users. Different kinds of work require different cache sizes. Someone using a word processor needs a larger cache than a spreadsheet maven, for example, because word processing documents and dictionaries are often spooled to disk, whereas entire spreadsheets are kept in memory.
      The size of your cache should be as big as you can make it without eating into the memory requirements of Windows and your largest application. That's a tough call to make, because it's almost impossible to know how much memory a Windows program really needs. Unlike DOS programs, Windows programs rarely tell you when they are out of memory. Instead, they just start swapping code to disk, running slower and slower as a result.
      The trick is to strike the right balance between free memory and cache memory. A good rule of thumb is to allot no more than one-third of your memory as cache, but maintain a minimum of 1.5Mb for Windows and Windows programs. On a 2Mb 286, make sure your CONFIG.SYS reads

 DEVICE=SMARTDRV.SYS 512 128

The first number represents the size of the cache; the second is SMARTDrive's minimum size. For a 3Mb 286, try 1024 512; for a 4Mb machine, try 1536 512.
      These numbers will work well for word processing and simple desktop publishing. If, however, your main application is a memory-intensive program such as a spreadsheet or a drawing package, you should decrease the first number slightly to 384, 768, and 1024, for 2, 3, and 4Mb machines, respectively.
      Note that the second number sets SMARTDrive's minimum size. If you work with both memory-intensive and disk-intensive applications, make the second number smaller so that SMARTDRIVE can respond to the changing needs of your work.
      Although SMARTDRIVE doesn't offer the level of control of some caching programs, it's more than enough for a 286. It caches all applications, not just Windows programs.

Get a Fast Hard Disk
Along with lots of memory, Windows likes fast hard disks. Windows and Windows programs use a frightening amount of disk space, so now might be a good time to consider dumping that old hard disk and buying a bigger, faster unit. Here's why: When you move from a typical 28- to 40-millisecond AT-class drive to an 18- to 23-millisecond high-speed drive, you'll be able to pull information from the drive 15 to 25 percent faster; this translates into far less time spent starting applications and loading files.
      When shopping for a hard disk, look for drives with low average seek times (20 milliseconds or less). Although a fast transfer rate is important, too, Windows usually doesn't read a huge amount of data when it accesses the hard disk, so put your money into fast seek rates.
      
Pump Up Your Video Card
A chain is only as strong as its weakest link, and a sluggish 8-bit EGA board can slow your whole system to a crawl. No matter how fast your hard disk is, and no matter how much memory you install, Windows absolutely requires a fast VGA card to run well. Unfortunately, most EGA and VGA cards sold before 1990 run about as fast as molasses in Minnesota. Before Windows 3.0, manufacturers optimized their adapters for fast operation in text modes and ignored graphics.
      If you have an EGA system, you absolutely must replace your card (and your monitor, unless it's multiscanning) with a VGA adapter. Windows runs optimally on a 286 PC at VGA resolution (640x480), and VGA adapters are inherently faster than EGA. If you already have VGA, you should still consider a newer, faster model, especially if your current adapter is an 8-bit unit.
      If you're going to replace your system's video card, check out cards that are referred to as Windows accelerators. These cards contain a graphics coprocessor that takes the load of screen redraw off of the CPU.
      But remember, no matter how fast your video card is, it will get bogged down if you put it in a 286 and try to run Windows in 256-color or Super VGA mode. Anything more complex than 640x480 by 16 colors is just too much for any system that runs slower than 33MHz.

Use TrueType Rather Than Type Managers
Windows 3.1 provides TrueType scalable fonts, which are all you should need for 286-level tasks. If you insist on using another type manager with Windows, be prepared to wait. Adobe Type Manager and Bitstream FaceLift simply use too many resources for a 286 PC. Another way to achieve scalable fonts on a LaserJet or other non-PostScript printer is to try a product, such as Zenographics SuperPrint, that offers the same control of printer output, but doesn't scale screen fonts on the fly or let you turn off screen font scaling, which saves your CPU for better things.
      You might consider buying a PostScript or PostScript-compatible cartridge for your printer and using the Windows Control Panel to change printers, to an Apple LaserWriter, which is how Windows views all PostScript-equipped printers. You'll get scalable output with no drain on your system and no additional fonts cluttering your hard disk. (This technique is covered fully in Chapter 8.)

Use Simple Wallpaper, or None at All
A single-color background may be boring, but the Windows Program Manager will display faster if it doesn't have to refresh a scene from Fantasia every time you resize a window. Removing wallpaper will also decrease the time it takes to load large Windows programs.

Practice Meticulous Disk Housekeeping
Defragmenting your hard disk helps most applications run faster, and Windows is no exception. When it's running, Windows creates dozens of temporary files to swap code to and from. These files don't necessarily get placed side by side on your disk; in fact, each file may be broken into chunks (called clusters) all over the drive's surface. That's how the DOS file system that underlies Windows crams as much information as possible onto a drive. But when you request a file, all those spread-out clusters have to be reassembled. That takes time, so when a disk is fragmented Windows won't run as fast as it could.
      You should run a disk reorganizer every month, even if the rest of your existing files aren't fragmented, to keep large, contiguous areas of your hard disk free. Here's an important caveat, however: Never run the disk defragmenter from within Windows; always return to the native DOS prompt first. If you don't, the attempt by a single program (the defragmenter) to manipulate critical disk files will cause Windows to lock up. DOS lets programs play with drives; Windows, because it tries to share resources among many programs, does not.

Printing
The Print Manager is one of Windows' weakest utilities: It's simply a print spooler that captures application output, stores it in a disk file, and prints it when CPU time is free. As a replacement, look for programs that intercept the output from your application and compress it into a proprietary format that uses less disk space and can be transmitted to the printer more efficiently. Since the files are so much smaller, you spend less time waiting.

Give Your System a Break by Turning on Draft Mode
Finally, you can give your working-at-the-edge 286 machine a break by lightening its graphical load. The less complex the PC's display requirements, the faster everything will run. If, for instance, the Windows application you're using has a Draft mode, use it whenever you can. You'll get better performance if complicated screen elements don't have to be redrawn every time you make a change. Likewise, turn off font scaling until you actually need WYSIWYG output.

Beware the Balky BIOS!
Deep in the heart of every DOS and Windows PC lies a cloistered segment of programming code known as the Basic Input/Output System (BIOS). The BIOS contains basic operating instructions for the PC: what resources it has available, how to configure memory, how to bootstrap itself when the power comes on. Because it handles such elemental aspects of the PC's operation, the BIOS is tremendously sensitive to change. The BIOS must be revised as hardware components such as processors and drives change and as operating systems grow more complex. Thus, an outdated BIOS can render an otherwise splendid Windows PC completely useless.
      If your PC refuses to handle Windows, the BIOS is the first place to look. As a rule of thumb, BIOSes dated pre-1988 should be upgraded. Usually, your PC's BIOS displays version information on screen at start-up. If not, you'll find information about the BIOS in your PC's documentation. If you have an old BIOS, avoid frustration by getting an update before the problems start. Contact your system manufacturer for a more recent version and instructions on how to install it in your machine.

BIOS Problems You Should Know About
Since forewarned is forearmed, here is a list you can scan to see if your computer's BIOS has been known to cause problems with Windows. If it has, you should contact your system manufacturer (not the BIOS manufacturer) for a more recent BIOS version that fixes these problems.	

ALR BIOS and Seagate Drives ALR Microchannel computers use a BIOS that is incompatible with Seagate IDE drives. If you are planning on upgrading your ALR hard drive to a popular Seagate IDE hard drive for better Windows performance, you'll need to reconsider.

Ami BIOS The Ami BIOS dated from 1987 may cause the system to reboot when you attempt to access the floppy drive in Windows File Manager. With an Ami BIOS dated 1989, you may experience unrecoverable application errors, general protection faults, or the system might hang. The Ami BIOS dated 1991 may cause mouse and modem problems.

AST BIOS On AST Premium 286 machines, the BIOS may cause system lockups, general protection faults, unrecoverable application errors, and, if the PC is hooked up to a network, network errors.

Award BIOS Award BIOSes prior to version 3.05 may cause floppy-drive read errors.

DTK BIOS DTK BIOSes prior to version do 35 not allow Windows to run in Enhanced mode.

Oak Technology Inc. Video BIOS Oak Technology BIOS versions earlier than 2.14 may make your system hang in Enhanced mode.

Peak/DM BIOS from Chips and Technologies Peak/DM BIOSes prior to version 1.30 may cause general protection faults and unrecoverable application errors.

Phoenix BIOS Phoenix recommends that any of their BIOSes dated earlier than 1988 should be upgraded to a more recent version. For AT&T 386 machines that use a Phoenix BIOS of 1.10.14 or earlier, you may be unable to run a DOS application in a window. To remedy the situation, reboot the system with the AT&T Customer Test that came with the computer, run the Setup utility, turn off the settings that say Redirect to COM1 and Redirect to COM2, and then save these changes.

Toshiba BIOS Toshiba T3100/20 systems need a BIOS version of 4.2 or later. Toshiba T3100e systems need a BIOS version 1.70 or later. Toshiba T2200SX systems with a BIOS earlier than version 1.20 may have incompatibility problems with the Trackball mouse plugged into the system's PS/2 port. 

Tandon BIOS Older versions of the Tandon BIOS may cause keyboard failures on PCs running Windows.

Wyse BIOS The Wyse BIOS has been know to cause the wrong keyboard to be selected during Windows setup. The 84-key keyboard may be mistakenly detected, instead of the correct 101-key keyboard. You'll need to run Windows Setup from DOS (not within Windows) to change this option.

Zenith BIOS Zenith 386/16 systems need BIOS version 2.6E or later, and the Zenith Turbosport 386 needs BIOS version 2.4D or later.

EISA Systems BIOS and Extended Memory
On some extended industry standard architecture (EISA) systems, not all of the extended memory available is detected by the system's BIOS, meaning that the memory goes unused by Windows. If your system seems unable to address all its memory, this may be the cause. You can eliminate the problem by placing a statement in your CONFIG.SYS file that orders HIMEM.SYS, Windows' memory manager, to use all of this available memory. The line might look like this:

 DEVICE=C:\DOS\HIMEM/EISA

      Certain problems between EISA memory and the BIOS involve device drivers or applications that use the same BIOS call as the PC's own system (known, in technical terms, as Interrupt 15h). Some older applications use Interrupt 15h to allocate extended memory to themselves. This was a trick they could get away with in early DOS days. Windows requires that programs use the extended memory specification of HIMEM.SYS to find their place in memory. An Interrupt 15h conflict will freeze your PC at boot time. To determine if you have a driver or application that uses this outmoded memory method, you'll have to check its documentation or talk to the vendor.
      If you do have such a driver or application, you can still load it in extended memory by telling HIMEM.SYS to set aside a specific amount of memory for its use. For example, to set aside 256K of extended memory for an application that uses the Interrupt 15h call, add a line to CONFIG.SYS that looks like this:

 DEVICE=C:\DOS\HIMEM/EISA/INT15=256

Hardware Headaches of Particular PCs
Not only BIOS problems, but other small variations in a PC's design can cause problems for Windows. In many cases, testing and cooperation between hardware manufacturers and Microsoft have unearthed problems and resulted in workarounds. Scan the following list to see if your computer has been known to cause problems with Windows and to find out what you can do about them.

Acer 1100 Computers and HIMEM.SYS If you're using an Acer 1100 computer and the Windows extended memory manager, HIMEM.SYS, you may actually need to tell HIMEM.SYS the model of computer you are using for extended memory management to work properly. The modified line in your CONFIG.SYS file might look like this:

	 DEVICE=C:\DOS\HIMEM.SYS /M:ACER1100n

Apricot Computers If you have an Apricot 386 system running Apricot's DOS 3.3 and you want to run in Enhanced mode, you need to install a console device driver such as ANSI.SYS. Without the driver, Ctrl+Break keystrokes might cause the wrong application to terminate. To install the ANSI.SYS driver from your DOS subdirectory, add the following line to CONFIG.SYS:

	 DEVICE=C:\DOS\ANSI.SYS

For Apricot computers in general, you'll need to get special drivers from Apricot to run Windows in Enhanced mode.

AST Rampage Boards and Microchannel PCs If your AST Rampage memory expansion board is configured to use both expanded and extended memory and you have a microchannel architecture system (such as a PS/2), you may need to get a driver update. RAMTYPE.SYS drivers prior to version 1.20 will not coexist with other applications that use extended memory. If Windows Setup detects RAMTYPE.SYS, it will remove it from your CONFIG.SYS file.

Compaq Deskpros and SMARTDrive 4.0 On some Compaq Deskpro 386/16 and 386/20 computers, you may have problems accessing your floppy drives when SMARTDrive 4.0 (the version included in Windows 3.1) is running in upper memory. You can get around this problem by restricting the SMARTDrive buffer to conventional memory. Simply add the /L parameter when SMARTDrive loads in your AUTOEXEC.BAT. The command would look like this:

	 SMARTDRV /L

If the problem persists when SMARTDrive is in conventional memory, or if you prefer to keep SMARTDrive in upper memory, you must disable caching on the floppy drives. To do this, you should include the line

	 SMARTDRV A- B-

in your AUTOEXEC.BAT file (assuming you have floppy drives A and 	B).

Epson Computers For Epson systems that come with screen-saver utilities, the utility may detect that the system is idle under Windows when it is not. If that's the case, the screen will appear blank, even though Windows and the system still function properly. You'll have to exit Windows and start it again to reactivate the display. If this is a problem with your system, you should disable the Epson screen-saver feature. Check the documentation that came with your system for details on how to do this, or contact Epson.

Everex Computers and Expanded Memory If you're using an Everex 386/25 and the Windows expanded memory manager, EMM386, you'll need to exclude a range of memory from being used to map expanded memory. To do so, edit your CONFIG.SYS file. If you're using Windows 3.0 (without DOS 5.0), the file for EMM386 is EMM386.SYS, and the line in your CONFIG.SYS would read

	 DEVICE=EMM386.SYS C600-C7FF

For Windows 3.1 and DOS 5.0 users: EMM386 now loads with the file EMM386.EXE and has different parameters than the Windows 3.0 version. The line in your CONFIG.SYS would look like this:

	 DEVICE=EMM386.EXE X=C600-C7FF

IBM 7552 Computer and HIMEM.SYS If you're using an IBM 7552 Industrial Computer and the Windows extended memory manager, HIMEM.SYS, you may need to indicate to HIMEM.SYS which computer model you are using for extended memory management to work properly. The modified line in your CONFIG.SYS file should read

	 DEVICE=C:\DOS\HIMEM.SYS /M:IBM7552

NCR 925 System and EMM386 If you're using an NCR 925 and the Windows expanded memory manager, EMM386, you'll need to exclude a range of memory from being used to map expanded memory. To do so, edit your CONFIG.SYS file. For Windows 3.0 (without DOS 5.0), the file for EMM386 is EMM386.SYS and the line in your CONFIG.SYS should be

	 DEVICE=EMM386.SYS E000-EFFF

For Windows 3.1 (or DOS 5.0) users, EMM386 now loads with the file EMM386.EXE, which has different parameters from the Windows 3.0 version. The line in CONFIG.SYS should look like this:

	 DEVICE=EMM386.EXE X=E000-EFFF

Wyse Computers and HIMEM.SYS To get a Wyse computer to work with the Windows extended memory manager, HIMEM.SYS, you need to tell HIMEM.SYS the computer model by placing this line in your CONFIG.SYS file:

	 DEVICE=C:\DOS\HIMEM.SYS /M:WYSE

Memory Secrets
A big part of optimizing Windows is knowing how to work with the memory you have. Of course, the only memory in your PC that applications can address is RAM. But your system can configure RAM in several different ways. To get the most from Windows, you'll need a basic understanding of the different forms your PC's memory can take.
      Conventional memory is the first 640K (0K through 640K) of memory available on your system. This is the memory where you run regular DOS applications, device drivers, and utilities. Windows itself also runs in conventional memory.
      Expanded memory is memory that is mapped by software onto the system's upper memory area (from 640K to 1,024K). This expanded memory is either found on an expanded memory card or, in a 386 system, it is emulated by an expanded memory manager (the Windows expanded memory manager is called EMM386). The expanded memory manager maps the memory in sections of a few thousand bytes, called pages, onto the upper memory area. Only DOS applications that are designed to use expanded memory can do so.
      Extended memory is the memory beyond the first megabyte. It starts at 1,024K and goes up to the amount of memory the system has installed-for example 4Mb or 8Mb. The first 64K of extended memory is called the high memory area (HMA). Windows extended memory manager, HIMEM.SYS, provides access to extended memory and the high memory area.

Find Out about Your System's Memory
Windows 3.1 comes with a handy utility called the Microsoft Diagnostics Utility (MSD). This utility gives you a rundown of system memory and the drivers that are installed on your system. To run MSD, simply type msd at the DOS prompt. See Figure 3.1.

How Much Memory Should You Have?
With Windows, the first rule of memory is the more the better. To extract top performance from Windows, the most important step you can take is to install more RAM. At a bare minimum, you'll need 2Mb of RAM. If you plan to run more than one Windows application at a time, you'll need at least 4Mb. For top performance, upgrade your system to 8Mb or more.

Getting the Most from Windows Memory Management
Working with PC memory is akin to putting together one of those intricate M. C. Escher jigsaw puzzles. Lots of options, lots of confusion, and it's hard to tell when you've put everything together properly. Because Windows sits on top of DOS, it can help memory management look better or perform more automatically, but it can't fundamentally change the confusing (that's the kind word for it) memory scheme DOS perpetuates. The tips that follow are among the most critical for getting maximum performance from a Windows machine. Memory is the foundation for any Windows setup; if it's unstable, so is everything else.

Determine the Best Way to Use EMM386 Don't use EMM386 at all if your regular suite of applications consists of Windows programs and small DOS programs. In that case, Windows will manage the region between 640K and 1,024K-the area containing the upper memory block-just fine by itself. If you use a bulky DOS application that will benefit from a bigger conventional memory space, go ahead and stuff device drivers and TSRs into upper memory with the help of EMM386. But leave some free space: Windows needs a contiguous block of at least 4K for Windows housekeeping chores. If you don't leave enough room in upper memory for these buffers, you'll pay a performance penalty.

Decide Whether You Really Need Expanded Memory Windows itself does not use expanded memory. If possible, you should reconfigure any expanded memory in your system as extended memory before installing Windows. But some DOS applications, like Lotus 1-2-3 2.x, can benefit tremendously from expanded memory (EMS). When Windows runs in Enhanced mode, it automatically creates expanded memory from extended memory as long as there's a contiguous 64K block of memory free in upper memory; you don't need to modify CONFIG.SYS at all. Windows (in Enhanced mode) and DOS need an EMS manager such as EMM386.EXE in order for DOS applications to access EMS memory. To create a 1Mb pool of EMS memory, add this line to your CONFIG.SYS:

 DEVICE=EMM386.EXE 1024 RAM

Convert Expanded Memory to Extended Memory Some systems' memory expansion boards allow their memory to be configured as either expanded or extended. (For an explanation of the difference between the two, refer to "Memory Secrets" earlier in this chapter.) If you don't require expanded memory (for instance, if you don't run any DOS applications that use it), you'll be wasting the memory configured this way on the board because Windows can't make use of expanded memory. And even if you do have DOS applications that use expanded memory, you should convert the memory to extended memory because Windows can change it back as needed. The expanded memory manager that comes with Windows, EMM386.EXE, can emulate expanded memory when an application requires it.
      The line in your CONFIG.SYS that loads the device driver for the memory board must load before the device driver that allows you access to extended memory (for example, HIMEM.SYS) and before the device driver that loads your expanded memory manager (for example, EMM386.EXE). The lines in your CONFIG.SYS file might look like this:

 DEVICE=C:\EMMBORD.SYS
 DEVICE=C:\DOS\HIMEM.SYS
 DEVICE=C:\DOS\EMM386.EXE

The first line represents the driver for your board.

Find Out What Switches Control EMM386.EXE To see a list of the switches for controlling EMM386.EXE after it has been loaded, type EMM386/? at the DOS prompt.

Troubleshooting EMM386: Invalid Path If starting Windows in Enhanced mode yields an error message indicating that you have an invalid path for EMM386, Windows may not know where to find EMM386. To fix this problem, add the /Y switch to the line in your CONFIG.SYS that loads EMM386. For example, if it is located in your DOS directory, the line might look like this:

 DEVICE=EMM386.EXE/Y:C:\DOS\EMM386.EXE

Also check that you have specified the correct path for HIMEM.SYS in your CONFIG.SYS.

Troubleshooting EMM386: Testing Whether EMM386 Works If you still get an error message stating that you have an invalid path, you need to see if HIMEM and EMM386 are working on your system. To do this, boot your system from a disk with a CONFIG.SYS file that contains only the commands for loading HIMEM and EMM386. The command that loads EMM386 should exclude the use of expanded memory, as the following does:

 DEVICE=C:\DOS\EMM386.EXE NOEMS X=A000-EFFF

      The AUTOEXEC.BAT file on the boot disk should only include a path statement, and a prompt statement if you want one:

 PATH=C:\DOS
 PROMPT $P$G

If your computer could not boot from the disk, you might have a problem with HIMEM or your hardware.

Troubleshooting EMM386: Conflicting Programs If you are having problems with EMM386, you may have a memory conflict with another program, device driver, or hardware card. If you think that certain TSRs or drivers may be causing the conflict, load them into conventional memory, not the high memory area, to see if that was the problem. If you think you have a conflict with a hardware device, try to find out the memory address that the card uses and exclude EMM386 from using it with the NOEMS parameter. For example, if your network card uses the D800h-DFFFh memory addresses, the line that loads EMM386 in your CONFIG.SYS would look like this:

 DEVICE=C:\DOS\EMM386.EXE NOEMS X=D800-DFFF

Troubleshooting EMM386: Doesn't Provide Expanded Memory If you receive Out of Memory errors or have problems when running DOS applications from Windows, but you can run Windows applications just fine, Windows may not be providing expanded memory to the applications. To force Windows to do so, edit the line that loads EMM386 in your CONFIG.SYS file to include the RAM parameter. The line would look like this:

 DEVICE=C:\DOS\EMM386.EXE RAM

Using Third-Party Memory Managers with Windows In place of HIMEM.SYS and EMM386, you can use a third-party memory manager. These memory managers usually offer a wider range of options for accessing the upper memory blocks, and they usually take less conventional memory to run than HIMEM.SYS and EMM386.EXE. But if you are satisfied with your system's performance using the Windows memory managers and don't relish the idea of learning how a new program works, stick with HIMEM.SYS and EMM386.
      If you do opt for a third-party memory manager, make sure not to use HIMEM.SYS and EMM386. You'll also have to avoid using their commands in your CONFIG.SYS and AUTOEXEC.BAT files. Statements to watch out for include DOS= UMB, DEVICEHIGH, and LOADHIGH.

Creative Tricks for Windows Memory
With enough memory loaded into your Windows PC (more than 4Mb for most Windows users) you can become clever in your uses of RAM. Memory can emulate a disk drive and can provide extra horsepower to your DOS applications.

Set Up a RAM Disk If you've got memory to spare, add a RAM disk to your system. It will use part of your system memory as a hard disk. RAM disks are faster than regular hard disks because they allow your computer to read information from memory, which it can do much more quickly than reading from a physical drive. However, because a RAM disk exists in memory, it will be lost once your system is turned off. This combination of speed and evanescence makes RAM disks the ideal place for storing TEMP files.
      Here are the recommended RAM disk settings for a system that runs Standard mode:

RAM           DiskSize

4Mb            1,024K
5-6Mb           2,048K
7Mb              2,560K
8Mb              3,072K
9Mb               4,099K
10-12Mb          4,096K

DOS Applications, Standard Mode, and Extended Memory If you run DOS applications that use extended memory in Standard mode, you should make sure to set up a .PIF file for each, specifying the amount of extended memory that the application needs. Keep this setting to the amount of memory that the application actually needs so that Windows can avoid swapping to disk. If you run this DOS application when all of the extended memory is already in use by Windows applications, data that already exists in extended memory will have to be swapped to disk to make way for your program's requirements. The extended memory setting in the PIF Editor is marked XMS Memory.

Troubleshooting Out of Memory Errors If you keep getting Out of Memory errors even though you're sure that you've got enough available memory, your problem may be with Free System Resources (FSRs). FSRs are composed of two 64K areas of memory, called USER (for input and output information) and GDI (for graphics and printing information), that Windows uses to keep track of system information for the current Windows session. These areas, and not your system memory, may be filling up. You'll have to close some applications or even restart Windows to recover from the shortage.

Remove Fonts to Save Memory Getting rid of some of Windows' fonts can mean more memory for your applications. But because Windows fonts really don't take up all that much memory, you'll only want to get rid of these if there's nothing else you can do to regain memory. To remove fonts from your system, open the Windows Control Panel and select Fonts. In the resulting dialog box, highlight the names of the fonts you want to remove, and then select Remove. If you change your mind and want to add the fonts back to your system, it's easy to do with the same Fonts dialog box, since you didn't delete them from your hard disk, but just removed them from memory.

Care and Feeding of TSRs under Windows
Because TSRs (memory-resident programs) take up precious memory and can also cause problems when running with Windows, you should approach them with care and caution. To be frank, one of the benefits of Windows is that it allows applications to interact, rendering much of the value of TSRs moot. However, if a TSR offers unmatchable benefit, you can continue to use it with Windows.
      The first rule to follow is to load those TSRs you absolutely need from your AUTOEXEC.BAT file. If a TSR is used with only one specific DOS application, don't load it until you are in a DOS session running the application. Better yet, create a batch file that loads the TSR and your DOS application simultaneously.
      If a TSR needs to be available to Windows applications and not DOS applications, it must be listed in the WINSTART.BAT file (a batch file that Windows runs whenever it starts in Enhanced mode) so that it will always be loaded when you're in Windows. To create WINSTART.BAT, use Notepad or another text editor. As with any DOS batch file, WINSTART.BAT contains the executable filename of each TSR along with any parameters required to load it. When saved in ASCII format under the name WINSTART.BAT, this file will automatically control the loading of the TSRs. The next time you start Windows in Enhanced mode, the TSRs should be available.
      Even if you follow this advice, however, TSRs may not run smoothly under Windows. Here are some tips for avoiding the land mines.

Troubleshooting TSR Compatibility Problems Windows Setup scans your system for TSRs that cause problems during the setup process, but it doesn't detect TSRs that might cause problems when actually running with Windows. If you add a problematic TSR to your system after Windows is installed, you'll have no way of knowing that you may experience compatibility problems-until they occur.
      If you experience system problems that you think may be TSR-related, such as the system crashing or incorrect displays, first check the DOS-based TSRs that load into high memory. To do this, change your AUTOEXEC.BAT file to load these TSRs into conventional memory. If the problem goes away, try loading them back into high memory one by one to isolate the incompatible TSR. If the problem persists, comment out the loading of all TSRs in your AUTOEXEC.BAT file and try restoring them to conventional memory, one by one, until you isolate the incompatible TSR.
      If your DOS TSRs pass muster, the problem may be an incompatibility between the program and Windows. Other users have discovered many of these problems through painful experience. Save yourself their trouble by looking at this list of TSRs that have been known to cause problems running with Windows 3.1:

ANARKEY version 4.00

APPEND, the DOS utility

DOSCUE, a command-line editor

GRAPHICS, the DOS utility

JOIN, the DOS utility 

LanSight version 2.0, a utility for controlling and monitoring workstations on a Novell network

Lockit version 3.3

MIRROR, the DOS utility

Newspace version 1.07

Norton Utilities version 5.0: Diskreet and Ncache

Norton Utilities version 6.01: DiskMon

Printer Assistant

XGAAIDOS.SYS

      The problems these products cause are unpredictable, varying with the situation and the machine. Just note that if any of these TSRs are present on your system they may well be at the root of your problems.

TSRs That Need Special Consideration Many TSRs in Windows are like prescription drugs: they're fine as long as your follow all instructions. Here are some guidelines for getting the most from TSRs that run with Windows.

BOOT.SYS BOOT.SYS, a tool for booting under multiple configurations from a menu, creates several sections in CONFIG.SYS and AUTOEXEC.BAT. Windows Setup only modifies the first section in CONFIG.SYS and AUTOEXEC.BAT. You'll need to modify the other sections manually to use Windows 3.1 with the alternate configurations.

Control Panel 2.2 LaserTools Control Panel version 2.2 might cause your system to hang if you load it from within Windows. Load Control Panel before starting Windows 3.1.

Doubledisk 2.5 Doubledisk version 2.5 creates "phantom" disk drives that Windows 3.1 might try to access. Vertisoft has a utility to make these phantom drives invisible to Windows 3.1. Contact Vertisoft to get this utility.

FASTOPEN The FASTOPEN DOS utility might need to be removed in low-memory situations for Windows to function properly. FASTOPEN also causes File Allocation Table (FAT) problems when used with disk defragmenting utilities, so be sure to remove FASTOPEN from memory before you defragment your hard disk.

KBFLOW The LANtastic KBFLOW TSR should not be loaded before you start Windows 3.1. To use KBFLOW, start Windows and then run it.

Le Menu 1.0 Le Menu version 1.0 may cause environment information such as PATH and PROMPT to be lost when you run a DOS application from Windows. If you are going to start Windows from a Le Menu menu option, set it up as a batch file menu option.

Logitech Mouse Software 5.0 and 6.0 The Click and Logimenu programs included in the Logitech Mouse Software, versions 5.0 and 6.0, must be loaded from within a DOS application running under Windows to be available to the DOS application, even if they were previously resident in DOS before Windows was loaded.

Norton Utilities 6.01  If it is on a disk drive, the Ncache program in Norton Utilities 6.01 prevents you from creating a permanent swap file.

PC-Tools Deluxe 6.0 and 7.0 PC-Tools Deluxe version 6.0's Desktop might cause your machine to hang if you launch it from a DOS application running under Standard mode Windows, and might cause your machine to reboot if it's running under Enhanced mode Windows. With PC-Tools Deluxe version 7.0, Desktop should not be run in a DOS session if it was resident before Windows was loaded.

Pyro! 1.0 Pyro! version 1.0 will blank the screen after the delay period has expired if it is loaded before you run Windows.

SideKick SideKick versions 1.0 and 2.0 and SideKick Plus cause many problems with Windows. For the best results, load SideKick from a PIF under Windows instead of as a TSR.

SPEEDFXR SPEEDFXR is not compatible with Windows as a TSR, so avoid loading it as one.

SUBST The DOS SUBST utility works with Windows if you do not add or remove substituted drives while in Windows.

Trantor T100 Trantor T100's Host Adapter Driver (TSCSI.SYS) mistakenly identifies the SCSI hard disk drive as a removable drive. If you try to access this drive in File Manager, your system may crash. Avoid using File Manager with this driver.

Disk Caches and Windows Performance
One of the best uses for any extra memory your PC has is to set up a disk cache, an area in memory where data recently drawn from the hard drive is temporarily stored. Caches can vastly improve Windows performance because pulling commonly accessed data from memory is so much faster than drawing it from a drive. Windows comes with its own disk cache program, called SMARTDrive, which is discussed a bit later in this chapter. Numerous commercial disk caches also run with Windows.

Run Your Disk Caches in Extended Memory Whatever disk cache you have on your system (and you really should have one) make sure that it is using extended (not expanded) memory. Windows is more stable if there are no DOS programs that use expanded memory running when it is loaded. SMARTDrive users don't have to worry about this (unless they've edited SMARTDrive's configuration) because SMARTDrive uses extended memory by default.

Tell Windows Where to Store Temporary Files A disk cache works by creating temporary files of recently accessed data in memory. To make it easy to keep track of these temporary files and to prevent them from littering your root directory and application directories, tell Windows where you'd like them stored. Try putting a line like this in your AUTOEXEC.BAT:

 SET TEMP=C:\WINDOWS\TEMP

Now, whenever you run Windows, it will automatically use the WINDOWS\TEMP directory for its temporary files. Having all the files in one location also makes it easy for you delete them.

Keep Your TEMP Directory Clean Deleting unnecessary files keeps Windows and its applications running as efficiently as possible. This holds for temporary files as well. When Windows is not running, delete any files that remain in your TEMP subdirectory, any files that start with the characters ~WOA (application swap files), and any file named WIN386.SWP. Windows usually deletes all of these files in the course of its normal housekeeping, but some may remain if an application or Windows terminates unexpectedly.

Store Your Temporary Files on a RAM Drive If you have a RAM drive set up on your system, it's a good idea to store your temporary files there so that when your system shuts down, it will take with it all of the temporary files stored on the RAM drive. You'll no longer have to worry about clearing your system of these pesky files.
      In your AUTOEXEC.BAT file, point Windows to the location of your RAM drive with a line like the following:

 SET TEMP= D:

Working with SMARTDrive
SMARTDrive is a perfectly adequate disk-caching program that comes with Windows and handles the basics of caching. More sophisticated cachesÑsuch as Super PC-Kwik, Norton Cache (included in the Norton Utilities), and the shareware standby HyperDisk-add an extra measure of performance improvement. To add SMARTDrive to your system, add a line to your AUTOEXEC.BAT file invoking it and specifying the correct size for your system. For example, for a system with 4Mb of RAM, the line would read

 C\WINDOWS\SMARTDRV 2048 1024

The first number is the size of the cache when Windows is not loaded, and the second number is the amount that Windows can reduce the cache size to when it is loaded. Here are some recommended settings for SMARTDrive based upon available system memory:

RAM  Setting 1  Setting 2

2Mb    1,024K       512K
3Mb    2,048K      1,024K
4Mb    2,048K      1,024K 
5-12Mb 2,048K     2,048K

How to Tell If You Need Double Buffering Windows' Setup program tries to determine if your system will require double buffering-that is, an increased amount of memory set aside for trading data with your disk drive. If Windows thinks that your system might need double buffering, it installs the double-buffering driver in your CONFIG.SYS file. The line might look like this:

 DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER

This driver does not actually load SMARTDrive; it merely makes the double-buffering driver available to SMARTDrive when it is loaded. SMARTDrive itself will be loaded from your CONFIG.SYS file.
      It's easy to determine if your system does, in fact, need double buffering. From the Windows DOS prompt (not a DOS session), and after SMARTDrive has loaded from your CONFIG.SYS file, type the command smartdrv. You will see a screen of information about running SMARTDrive on your system. (See Figure 3.2.) The buffering column displays the status for each of your drives. If all the entries in this column say "no," you do not need double buffering. In that case, you can save yourself some memory by deleting the line in your CONFIG.SYS file that loaded the double-buffering driver.
       If double buffering is required on your system, you can achieve the best performance by loading the driver into conventional memory rather than the upper memory blocks. When your system uses double buffering, performance decreases because of the additional memory required for all disk reads and writes. If you loaded the double-buffering driver into the upper memory blocks, you would introduce yet another step into the process, where buffering from the upper memory block to conventional memory would have to take place.

Fine-tuning SMARTDrive 4.0 You can fine-tune SMARTDrive performance on your system by using command-line parameters that set the size of the read-ahead buffer and the size of the chunks of data that SMARTDrive moves at one time. You should type the parameters discussed here on the command line following SMARTDRV.EXE.
      The /B switch sets the read-ahead buffer, which tells SMARTDrive how much extra information it should read while doing a read from the disk. For example, if the /B setting is 1024 and an application reads 512K of information from a file, it would read an additional 1,024K of data into buffer memory at the same time (for a total of 1,536K). For the next disk read, SMARTDrive will look in the cache to see if the requested information is already there. The buffer size has to be a multiple of the element size because SMARTDrive can only deal in whole chunks of information.
      The /E switch sets the maximum size for each chunk of information (in bytes) that SMARTDrive reads and writes. The default setting for /E is 8,192 bytes, and the other valid settings are 1,024, 2,048, and 4,096. The /E parameter should match the allocation unit size reported by CHKDSK. For example, the command for loading SMARTDrive with a read-ahead buffer of 512K and an element size of 1,024 bytes is

 C:\WINDOWS\SMARTDRV.EXE /E:1024 /B:512

Force SMARTDrive to Write All Data to Disk Avoid turning off your computer while write-caching is going on, because this may result in a loss of data. If you are not sure whether data was written to disk, or if you need to turn off your system immediately, you can force SMARTDrive to write all of the data to disk by issuing the SMARTDRV /C command at the DOS prompt.

Managing Windows COM Ports
Under DOS, managing communication ports was a true nightmare. Under Windows, it's merely a headache. The Ports icon in the Windows Control Panel generates a relatively easy-to-follow dialog box for setting up basic communications ports. Keep the following tips in mind, however, for high-end communication needs or when unexpected problems crop up.

Using COM3 or COM4 with Windows 3.1
Because there is no common hardware configuration for using COM ports 3 and 4, it is best to avoid using these ports unless both COM1 and COM2 are unavailable. If, however, you need to configure COM3 and COM4 for use with your system, do the following:
      Open the Control Panel and select the Ports icon. Choose the port you want to configure-for example, COM3. Choose Settings, and check whether the communications settings meet the hardware requirements for the device that you are configuring on that port. Choose Advanced, and specify the Base I/O Port Address and Interrupt Request Line (IRQ) for the device. If you don't know the correct settings, try using the Default settings.

Using COM3 and COM4 with Windows 3.0
If you happen to be confronting a PC with Windows 3.0, you cannot specify the Base I/O Port Address or Interrupt Request Line (IRQ) for ports. But these settings may be crucial to avoiding conflicts among your PC's peripherals. To specify these settings, you have to edit your SYSTEM.INI file, as explained in Chapter 2. In the [386Enh] section, find the following lines:

 COM1Base=3F8h
 COM2Base=2F8h
 COM3Base=2E8h
 COM4Base=2E0h

      For the correct port, specify the address of the hardware you are setting up. This information should be contained in the productÕs documentation.

Allow IRQ Sharing
If two of your serial ports share the same IRQ lines, you'll also need to specify this in your SYSTEM.INI file. In the [386Enh] section, find the line:

 COMIrqSharing=Off

Change this setting to On to allow for IRQ line sharing.

Add Support for More than Four COM Ports
If you have more than four COM ports on your system, you can edit your SYSTEM.INI file to allow for support of all your COM ports. In the [386Enh] section, find the setting that reads

 MaxCOMPort=4

and change the number 4 to the number of COM ports that you have.

Hard-Drive Management for Windows
Under DOS a hard drive was valuable; under Windows it's essential. Windows will recognize and adjust itself to your hard drive far more easily than DOS did. In Windows your problems won't so much be based on getting your hard drive working as on keeping it operating at peak performance. That is the thrust of these tips.

Golden Rules for Hard-Drive Performance
Here are the six golden rules for keeping your hard disk in trim. Practice them religiously.

Delete any files that remain in the TEMP directory. This is the directory that applications use to store temporary files.

Delete any files that start with the characters ~WOA. These files are application swap files that are used by some applications. Normally, Windows deletes these files when you exit the actual applications, but if Windows terminates unexpectedly, these files may still remain.

Delete any files that start with the characters ~GRB. These files are created by Windows to save screen information before you switch out of a DOS application.

Delete any file named WIN386.SWP. This file is the temporary Windows swap file. Windows normally deletes it when you exit, but if Windows terminates unexpectedly it may still be there.

Regularly delete backup files that you no longer need, especially if your applications generate these backup files for you automatically.

Delete any accessories, help files, games, and wallpaper files that you don't use. For more details about Windows files that you can do without, see Chapter 1.

Maintaining Optimal Hard-Disk Performance
Cleaning out unnecessary files from your hard disk is only part of the hard-disk maintenance you should do regularly. While in DOS (not a Windows DOS session), run the DOS utility CHKDSK to see if you have any lost chains or clusters on your disk. Remember that files arenÕt stored on your disk in one piece; they are broken into chunks and then reassembled when you call for them. Chains and clusters are chunks of data that have become separated from their host file. If CHKDSK reports that you do have lost clusters, type chkdsk/f to run CHKDSK again and have DOS do its best to restore these lost clusters into files.
      After you run this command, you will notice files with the extension .CHK on your disk. These files correspond to the number of lost clusters and chains that CHKDSK found. You can even open these files to see what they contain if you think you might want to save some of this information. When you're done, delete these .CHK files.
      You should also use a utility program to defragment your hard disk regularly. A fragmented hard disk reduces Windows performance, especially if SMARTDrive is installed or you are using a temporary swap file.

SCSI Hardware and Windows
If you plan to use SCSI hardware with Windows, such as a new hard disk or CD-ROM player, you'll require special device drivers for them. Drivers are usually available from the manufacturer, so be sure to ask at the time of purchase.
      If you're using Windows with an SCSI hard disk, make sure that you use SMARTDrive and its double-buffering option. With SMARTDrive installed, Windows will direct all disk access requests through it, eliminating potential hardware conflicts. The double-buffering option means that SMARTDrive adds a memory buffer where physical and virtual addresses are the same.
      If your SCSI hard disk uses direct memory access (DMA), you'll need to add the following line to the [386Enh] section of your SYSTEM.INI file:

 VirtualHDIRQ=false

This statement prohibits Windows (running in Enhanced mode) from terminating interrupts from the hard-disk controller and bypassing the ROM routine that handles these interrupts. Turning this setting off ensures that interrupts will be processed correctly.

Windows and Disk-Compression Programs
Disk-compression utilities such as Stacker and SuperStor can be a boon with Windows. These applications shrink data and program code so that you have less to read or write from the hard drive. Performance soars and the size of your hard drive appears to nearly double. However, there are a few things you must keep in mind. You can't create a permanent swap file on a compressed volume, and you can't use SMARTDrive to cache this compressed volume. (Swap files are the subject of the next section, "Setting Up the Windows Swap File.") You can, however, create a permanent swap file on the physical disk that contains the compressed volume, and you can also use SMARTDrive on this physical drive. Also, you should never use a regular disk-defragmentation utility on a compressed volume; use the utility provided with the compression package instead.
      If you are using SMARTDrive with the disk-compression program, make sure that SMARTDRV.EXE loads after the program in your CONFIG.SYS file. This ensures that the SMARTDrive is only caching the physical drives on your system. You can also load SMARTDrive from your AUTOEXEC.BAT file with a parameter telling it not to cache the compressed volumes. For example, if E and F are your compressed volumes, the command would read

 SMARTDRV E- F-

      If you install the Stacker disk-compression program after Windows is already on your system, you'll have to recreate any TEMP directory that you were using, because Stacker deletes empty subdirectories when it is installed.

Setting Up the Windows Swap File
Just as excess memory can be used to emulate a hard drive (with a RAM disk), excess disk storage can be configured to look like RAM. This "fake" RAM is known as virtual memory. One of the best ways to use virtual memory is to establish a swap file.

Add a Swap File to Your System In Enhanced mode, a swap file lets you use hard-disk space to create virtual memory in addition to the physical memory in your system. The total swap-file size can be up to three times as large as the amount of physical RAM in your system.
      In Windows, Express Setup creates a temporary swap file, which is somewhat slower than the permanent variety, and Custom Setup lets you specify whether you want a temporary or permanent swap file.
      If you have disk space to spare, you should install a permanent swap file, but if you're rapidly running out of disk space, a temporary swap file is the way to go. A permanent swap file improves Windows performance because it is contiguous (one large chunk), so access to it requires less overhead than that required for a temporary swap file, which can be all over your hard disk.

Tips for Setting Up a Permanent Swap File Before you create a permanent swap file, defragment your hard disk with a disk-compacting utility. To create the swap file, choose the 386 Enhanced icon from the Windows Control Panel and click on the Virtual Memory command button. You'll see a series of command buttons on the right; press the Change button. In the resulting dialog box, you'll see the actual size of any existing swap file, a recommended size, and a space to enter the size you want. Type in the swap file size and click on OK. A dialog box will appear, asking you to confirm the new setup. Click on Yes. (See Figure 3.3.)
      To give your swap file what it needs to run quickly, make sure to use the fastest hard disk on your system, and never swap to a network drive or a RAM disk. A swap file created on a RAM disk is self-defeating because you sacrifice physical memory to create virtual memory.
      And never delete, move, or rename the hidden files SPART.PAR and 386SPART.PAR. 386SPART.PAR is the actual swap file, while SPART.PAR is a read-only file that tells Windows how large the permanent swap file is and where it is located. The only exception to this rule is that, if you ever receive an error message that says your swap file is corrupted, you should delete the current swap file and create a new one from the Control Panel.

Temporary Swap File Tips If you're rapidly running out of disk space and would prefer a temporary swap file, Windows lets you edit your SYSTEM.INI file to specify the minimum amount of hard-disk space that will always be available. For example, to restrict the size of the temporary swap file to the amount of available hard-disk space minus 1Mb, open SYSTEM.INI and add the following line under the [386Enh] section:

 MinUserDiskSpace=1024

Also in the [386Enh] section of the SYSTEM.INI, you can specify where you want to locate the temporary swap file. If you want to set the swap file to an actual filename, you can enter the path and filename after the PagingFile= entry. Or if you prefer to assign the swap file to a specific drive, you can do so in the PagingDrive= entry.

The Best Swap File May Be No Swap File If you have ample memory on your system (8Mb or more), you may achieve better Windows performance without a swap file. Your system memory may be all that you need to run applications, and Windows won't be slowed down by having to swap to disk.

Making the Most of Input Devices
The keyboard was probably the only peripheral that DOS handled effortlessly. Mice gave DOS some problems. Windows improves operation of both peripherals (its ability to shift to alternate keyboards goes far beyond DOS's, for instance). However, potential problems remain, especially along the DOS-Windows border.

Mouse Secrets
Because DOS handles mice in a clumsy fashion, and because contention can sometimes arise between mice and other peripherals, mouse installations under Windows are sometimes frustrating. The following sections include some suggestions for mouse use under Windows.

Loading the Microsoft Mouse You can load the Microsoft mouse driver for use with DOS applications one of two ways: from your CONFIG.SYS file with a device command, or from your AUTOEXEC.BAT file as an executable file. It is better to use the MOUSE.COM driver loading from AUTOEXEC.BAT than MOUSE.SYS from CONFIG.SYS. This prevents problems that Windows may have saving the DOS settings for the Control Panel utility that comes with the Microsoft mouse. If you do use MOUSE.SYS and have problems with these settings, make sure that the mouse is being loaded from the mouse directory, not the Windows directory.

Tips for Microsoft Mouse Troubleshooting If you cannot make your Microsoft mouse work with Windows, Windows may not recognize the mouse on your system. If there is an unused mouse port on your system, Windows may be detecting that instead. Refer to your system documentation or contact your system manufacturer for details on how to disable the unused port. Windows may also fail to recognize your mouse because it thinks that some other hardware hooked up to your computer, such as a scanner or modem, is the mouse. If your mouse is hooked up to COM1 or COM2, try swapping ports to see if this resolves the problem.
      If you are using a Microsoft mouse version 8.0 or later, you can edit your mouse initialization file (MOUSE.INI) to tell Windows exactly where the mouse is located. Open the MOUSE.INI file in a text editor, and look for the line that says MouseType=. Table 3.1 lists the settings that you can place after the equal sign to tell Windows where your mouse is.

TABLE 3.1 Indicating the Type of Mouse You Are Using

Setting  Mouse Type

Serial For a mouse on either COM1 or COM2
Serial1 For a mouse on COM1
Serial2 For a mouse on COM2
PS2 For a mouse on a PS/2-style mouse port
Bus For an older bus card 
InPort For an InPort card
InPort1 For an InPort card, with Jumper 3 set to primary
InPort2 For an InPort card, with Jumper 3 set to secondary

Using a Logitech Mouse with Windows Logitech mouse users will probably need to a do a little bit of adjustment to use their mouse with Windows. Even though the Logitech mouse driver in Windows 3.1 works fine, the Logitech drivers also provide other features such as speed and shape of mouse cursor. And some Logitech mice are identified by Windows Setup as Microsoft or IBM PS/2 mice and will use the Microsoft-compatible mouse driver. So to make sure you get the best performance, use the drivers that came with your mouse instead of those provided with Windows.
      To use the mouse with DOS applications you need to load the DOS mouse driver, MOUSE.COM, before you load Windows. if you'll be using a mouse with DOS applications on a regular basis, put the command to load MOUSE.COM in your AUTOEXEC.BAT file. You also need a line to your SYSTEM.INI file that loads the driver in each DOS session. The line in the [386 Enh] section should read

 local=PC$MOUSE

Cover More Ground with Your Mouse If you seem to be forever dragging your mouse across the screen to get where you want, speed up the Mouse Tracking Speed in the Mouse Control Panel settings. (Double-click on the mouse icon within the Control Panel.) Moving the speed indicator all the way to the right makes a dramatic difference in the distance you can cover with each hand motion. It also means you won't have to continually pick up your mouse and reposition it to keep it on your mouse pad.

Keyboard Tips and Tricks
Loading the standard QWERTY keyboard under Windows is essentially automatic. But shifting smoothly to alternative keyboards and supercharging keyboard performance take a bit more work.

Change Keyboard Layout to Non - U.S. If you are using Windows and have to change your keyboard layout often-perhaps you are bilingual and work in two languages regularly-you can change the keyboard layout by selecting the International icon in the Control Panel. Windows will need the Setup disk to copy the new file to your system. You are prompted for the new .DLL file only once. Each successive time that you change the keyboard layout, Windows tells you that a driver is already installed and asks if you want to use the current one or install a new one. See Figure 3.4.

Increase Keyboard Responsiveness If you're running more than one application at a time, your keyboard may not be as responsive as it normally is. You can edit the [386Enh] section of your SYSTEM.INI file to adjust the amount of time allocated to an application when it receives a keystroke. You can set the KeyBoostTime= setting to increase this priority. This line will probably not be in your SYSTEM.INI, so you will have to add it. The default is .001. Try setting it to .005, like this:

 KeyBoostTime=.005

Sharpening Your Windows Display
Yes, Windows is a graphical environment. However, curiously enough, Windows isn't designed for the most advanced display options on PCs today. Big screens, screens with a large number of colors, and displays that go beyond the common VGA standard all can cause Windows headaches. The reason behind this lowest-common-denominator approach to graphical display in Windows seems to be a desire to ensure that the system runs on as many machines as possible, rather than running superbly on fewer leading-edge PCs. That probably makes sense. And you can get your high-end graphics screen humming under Windows if you know what you are doing.

SVGA Displays
Super VGA displays (known as SVGA) have become extremely popular on powerful Windows PCs. These monitors can show more text on screen than VGA displays, and offer far better color resolution and better refresh rates (which translates into screen crispness). The problem is that SVGA isn't a single standard. Rather, it's a loose family of approaches that have in common only the fact that they are more powerful than VGA. Needless to say, this can create problems for users. Here, we offer some advice that applies to SVGA generally. Other possibilities may exist for your particular monitor; use bulletin board services from your manufacturer or vendor literature to get the most from the particular SVGA setup you have. Also, check out the section "Specific Video Board Problems" that follows.

Give Up 256 Colors for Improved Performance If you're using a Super VGA display, you can improve Windows performance by giving up your 256 colors and sharper images and going back to regular VGA. For applications, such as graphic packages, that require the higher resolution and enhanced color support, you'll want to stick with SVGA, but if you're not really using these features it's an unnecessary burden on your system.
      However, if your system has a video accelerator board with its own graphics coprocessor, switching from SVGA to VGA will not make much of a difference to system performance.

Switch between SVGA and VGA Resolutions with Batch Files If you have a display that supports SVGA resolution, you may find yourself switching back and forth between VGA and SVGA depending on the task you are doing. For example, you may use SVGA when you are using a graphics program, but find that VGA's larger text is better for word processing. Instead of having to change the display resolution by running Windows Setup each time, you can create batch files that run Windows in the different modes. When you make these change in Windows Setup, Windows rewrites your SYSTEM.INI file with the new settings. As a result, all you have to do is create and maintain separate SYSTEM.INI files for each display mode you want to run Windows in.
      For example, if you are currently running Windows in regular VGA, copy the SYSTEM.INI file and name it something like SYSTEM.VGA. Now run Windows Setup and change the display mode to SVGA. Copy the SYSTEM.INI again, naming it something like SYSTEM.SVG. Next, write batch files that copy these special SYSTEM.INI files to be the current SYSTEM.INI file, and then load Windows. The batch file to run Windows in VGA, which might be called VGA.BAT, would look like this:

 COPY SYSTEM.VGA SYSTEM.INI
 WIN

      To run Windows from a display mode other than the current one, exit Windows and start the corresponding batch file.

Rooting Out Video Problems
In a situation as confused as video is today, problems are inevitable. Drivers, the programs that describe peripherals to the operating system, are extremely model-specific. The assumptions applications make about how they are being displayed may not be consistent. Of all the areas of Windows, this is the one where troubleshooting is most likely to be necessary.

Tips for Troubleshooting Display Problems To troubleshoot display problems, you need to know that Windows display drivers actually have three parts: the driver file (*.DRV), which allows your hardware to talk to your software; the grabber files (*.2GR, *.3GR or *.GR2, *.GR3), which support data exchange between Windows and DOS applications; and the virtual display driver (VDDx.386), which provides virtual display support for DOS applications running in Enhanced mode.
      If you install a third-party display driver, you must make sure that all of these files are updated and added to your WINDOWS\SYSTEM subdirectory. You also need to make sure that the grabber entries in the [boot] section of SYSTEM.INI file are accurate. They are 286grabber= or 386grabber=. The filename of the grabber file should come after the equal sign. For more information on installing video drivers, see the section "How to Install a New Set of Video Drivers Safely" a little later in this chapter.
      You may also have problems running a VGA display adapter in Enhanced mode if your video card uses additional memory to enhance its performance. In most cases, Windows detects this memory and excludes it from being used, but you may need to add an emmexclude= entry in the [386Enh] section of SYSTEM.INI if you are having display problems. This entry specifies the memory address that the card uses.

Specific Video Board Problems There are literally hundreds of video boards available for Windows-capable PCs. Here are some of the known problems for boards from leading manufacturers:

Cornerstone Full-Page Display with Type-A Video Card If you have a Cornerstone Full-Page Display and are using the Type-A video card, you may have problems running DOS applications in Enhanced mode. According to Cornerstone Technical Support, this problem occurs because of a hardware limitation of the Type-A video card. You may need to upgrade to the Type-B video card.

STB Powergraph Ergo Video Card and Excel If you are using the STB Powergraph Ergo video card with Excel 3.0 and Windows, you may experience Uses or General Protection Faults. The Powergraph Ergo video card may also cause your system to freeze if you are using Excel 3.0's Print Preview. To fix these problems, you should get the most recent video driver for the card or upgrade the BIOS on the video card.

Quadram VGA Cards and Video Display If you are using a Quadram VGA video card, you may experience display problems such as being unable to have the DOS prompt in a window, or a corrupted display as a result of the Alt+Tab key combination. To help performance, you should run the DOS command MODE CO80 before or after running Windows. This command tells DOS that you are using a color adapter with an 80-column display.

Tseng Labs Video Card in Austin Computers If your Austin computer has a Tseng Labs video card installed, you'll need to have a BIOS dated 4/90 or later to run Windows.

How to Install a New Set of Video Drivers Safely
When you install a new set of video drivers for Windows, you should avoid directly running the SETUP.INF file that comes with the third-party driver disk. The SETUP.INF is used by Windows Setup to copy the correct files to your system, based on the kind of hardware you have and the choices you make during setup. If you run the SETUP.INF file that came on the driver disk, you risk corrupting your original SETUP.INF file.
      Try renaming the SETUP.INF file on your driver disk to OEMSETUP.INF. When you run Setup from DOS and you are prompted for the disk, Windows should find the OEMSETUP.INF file. If this doesn't work, you can accomplish the same thing by hand: Copy all the drivers (they'll have the .DRV extension) from the disk into your WINDOWS\SYSTEM subdirectory. Also copy any files with the .386 or .286 extension to this directory. Open the SETUP.INF file that came on the third-party driver disk in a text editor.
      Look for the [display] section, which contains a list of driver filenames and parameters for using them. Find the drivers that you will need, and select this section of text. Copy these lines to the Clipboard, and then open your real SETUP.INF file. In its [display] section, paste the lines at the end of the driver list. You can now run Windows Setup, and these new driver choices should appear.

Get Rid of Old Drivers
If you're trying to sort out video drivers, figuring out which ones were from your old Windows 3.0 installation and which ones belong to Windows 3.1, you can take a look at the dates of the files. Go to the WINDOWS\SYSTEM subdirectory in File Manager and choose View, Sort By Date. You can safely get rid of those driver files that are dated before Windows 3.1 came out (that is, before April 6, 1992).

Changing Windows Screen Fonts
Under DOS we were stuck with a single block-like on-screen font for 10 years. We didn't have WYSIWYG ("what you see is what you get"). We suffered through WYGIWYS ("what you get is what you see"). Windows, too, comes with standard screen fonts for such elements as title bars, but happily you can change them at will.

Changing Windows Screen Fonts by Editing the WIN.INI You can change the font that Windows uses to display menu text, title bars, and dialog boxes by adding a line to your WIN.INI file. (See Figure 3.5). The system font that Windows uses to display this text is normally defined in the [boot] section of the SYSTEM.INI file. Look for the line that reads something like this:

 fonts.fon= vgasys.fon

      However, you can supersede this setting by specifying a different font in the [windows] section of the WIN.INI. Add a line that specifies one of the raster fonts that are installed on your system (located in your WINDOWS\SYSTEM subdirectory). For example, to set the system font to Courier for a VGA display, you would enter a line like the one highlighted in Figure 3.5:

 SystemFont=coure.fon

If you try using one of the vector fonts instead (such as Script), you'll get screen text that's too large.

Use Small Fonts on Big Monitors If you're using a Super VGA display and want to get more information on screen at once, change your system fonts to those for a VGA display. Once again, you need to edit the SYSTEM.INI file to do so. Run Windows Setup to select the display mode that you want-for example, SVGA. Next, open your SYSTEM.INI file and in the [boot] section you'll see the entry:

 fixedfon.fon=8514fix.fon fonts.fon=8514sys.fon
 oemfonts.fon=8514oem.fon

Change this setting to request those fonts regularly used for a VGA display:

 [boot]
 fixedfon.fon=vgafix.fon fonts.fon=vgasys.fon
 oemfonts.fon=vgaoem.fon

The next time you use Windows you'll be using these smaller fonts and will get more information on your display at one time.
      If you have a VGA display, or if you want even smaller text on your SVGA display, you can use the EGA fonts instead.

Make the Cursor Easier to Find by Changing Its Blink Rate
If you like strong coffee, and you edit text with intensity to match, then increase Windows' cursor blink rate to its maximum. You'll be amazed how much faster you can locate the quickly flashing insertion point on a full page of solid text. From the Windows Control Panel, double-click the Desktop icon. From the Desktop dialog box, move the Cursor Blink Rate slider bar all the way to the right for the fastest blink rate.

Multimedia Tips
Multimedia is an emerging area for Windows. It is a natural extension of the graphical nature of the Windows environment. By combining traditional computer operations with motion and sound, multimedia holds the promise for newly interactive business programs, as well as a union between computing and entertainment. Because it is so new, the course multimedia will take, and what it will mean for business users, remains unclear. Although this book does not focus on this area too heavily, here are a couple of secrets to give you a flavor of what lies ahead.

Troubleshooting Audio in Windows
If you have a sound card and speakers installed on your system, but you donÕt seem to be getting any sound, there are a few simple things to check before delving into the box for a possible hardware conflict. First, make sure that your speakers are plugged into the right port. The microphone port is often confused with the speaker port. Also, check the volume setting for your sound card. If you have accidentally turned it all the way down, you won't get any sound. Another thing to check is that the speakers have power to operate. Some speakers need batteries, while others need to be plugged into an electrical outlet. You'll also want to check the drivers in the Control Panel to verify that you have the right sound driver installed for your sound card. Lastly, check for IRQ and address conflicts between the sound card and other system hardware.

Troubleshooting Audio in DOS Sessions
If you attempt to run a DOS application that supports sound under Windows, but you get a message that the application won't be able to use audio, you may still be able to get sound. If you are running in Enhanced mode, exit Windows and restart in Standard mode (type win/s). You should now have support for sound. In Enhanced mode, Windows takes over your sound hardware and won't give up control to a DOS application.

CD - ROM Drives and the Microsoft DOS CD - ROM Extensions
If you are using a CD-ROM drive with Windows, make sure that you are using a recent version of the Microsoft CD-ROM Extensions (MSCDEX). If your drive is not working properly with Windows, you may need to get a more recent version of MSCDEX. If you are upgrading to version 2.20 or later, be sure to remove the following line from the [386Enh] section of your SYSTEM.INI (it was required for previous versions):

 device=LANMAN10.386

      If you use this setting with a recent version of MSCDEX, you may experience time-out and failure problems with the drive. But for versions prior to 2.20 the setting should remain in your SYSTEM.INI.

Troubleshooting a CD-ROM Drive
If your PC doesn't recognize your CD-ROM drive, first check that all of your connections are correct. And if your SCSI drive requires an external terminator, make sure that this is also installed correctly. Verify that you have the Microsoft CD-ROM Extensions (MSCDEX) installed on your system. Also make sure that the directory where MSCDEX is stored is included in your path statement.

Tips for Traveling with Windows
It's tough to work with Windows in the office and go back to DOS on the road. The good news is that notebook computing has increased in power to the point where mobile Windows actually makes sense. Notebook screens achieve VGA quality in readable black and white, and color screens are now emerging. Hard drives as large as 80Mb are not uncommon on notebook computers today. Still, saying that Windows makes sense on notebooks isn't saying that the mobile environment is the same as the desktop. It's not. Windows on the road is a less-equals-more proposition; you want to squeeze the most Windows performance out of the smaller, less powerful, less naturally graphical package of a notebook PC.

Free Up Valuable Real Estate
You're careful not to overpack your suitcase for a weekend, so why stuff the small hard disk on your notebook PC with superfluous Windows files? On a typical 40Mb hard drive, that real estate is just too valuable to waste. If you're not sure you need an accessory or file, keep it on your system. Or remove it but take along your Windows disks just in case. For a list of files that you can trim from your notebook's hard disk, see Chapter 1.

LCD Screen Eye Savers
Running Windows on a tiny monochrome screen adds new meaning to the word eyestrain. Give your pupils a break by fine-tuning the display. For starters, run Setup and choose the VGA with Monochrome Display option. Next, you can optimize your desktop colors for the best results on an LCD screen. If you're a Windows 3.1 user this is merely a matter of selecting one of the four preconfigured LCD color schemes. (See Figure 3.6.) Choose the Color icon from the Control Panel and select the one you want.
      You should also select the Mouse icon while you're in the Control Panel. In the resulting dialog box, you'll find a check box labeled Mouse Trails. Click there, and your mouse pointer will streak across the screen with a satisfyingly visible blur, making it much easier to track on a dim screen. Using a third-party program that enlarges your cursor or changes its shape is another way to make the cursor easier to find.

Opt for a Larger Font
Another simple way to make screens more readable is to use larger fonts. If you're knocking out memos or expense reports while you're on the plane, for example, why not bump up your program's default font size a couple of points? You can always switch back to your usual size when you hook up to a printer. The methods for changing fonts vary from program to program, but you'll find tips on several dozen applications in Part 2 of this book.

Use Keyboard Shortcuts
Before you hit the road, review your favorite programs' keyboard shortcuts. Develop some key-combination macros that replace menu selections three or four mouse clicks deep. And never click on, or cancel in, dialog boxes-Enter and Esc do the job much better. Chances are you won't be able to get by with the keyboard alone, but you can at least minimize your dependence on the clumsy pointer. For maximum convenience on a business trip, you might want to pack two devices-a standard mouse for hotel and client-site use and a trackball for the plane.

Customize Style Sheets for Laptop Use
If the software you use on the road employs style sheets, set up a large default font on the laptop and a smaller one on your desktop machine. In Word for Windows, for example, define the Normal style in the Normal template as, say, 14-point Arial on your laptop and 10-point Arial on your desktop system. When you transfer your work from one machine to the other, the text will change point size automatically.

Have Different Printer Drivers Available
Also make sure that you've got several basic printer drivers installed on your portable system, so that you're prepared to print no matter where you are. You should include the generic driver and an HP LaserJet driver, as well as one for Epson dot-matrix printers. Between these three basic drivers, your bases should be covered.

Avoid Trouble with Remote-Control Applications
If you use remote-control software to run Windows-perhaps you use a program such as pcAnywhere to control your office PC from your home computer or laptop-you've probably run into problems trying to load Windows. So-called remote-control programs work best with character-based applications because there's not much screen data to be transferred from host to remote in order to show the application running on the host PC. With faster modems in particular, screen updates can be so fast that it's easy to forget you're working remotely.
      A graphical application such as Windows, however, contains several hundred thousand pixels on each screen. Transferring that much information from one computer to another simply isn't practical for remote operation-you'd have to wait five minutes for the screen to update! None of the vendors of remote-control programs has yet mastered the process for Windows.
      In the meantime, there is one simple trick that might help you avoid accidentally trying to run Windows across a phone line. Before you leave the office, change the prompt on the host machine to something that will constantly remind you that youÕre working remotely. For example, you can type

 PROMPT ** HOST ** $P $G

on the host machine before you leave it unattended. Then, when you log on with the remote machine, you'll see the following prompt:

 ** HOST ** D:\123>

With luck, this distinctive prompt will cause you to think twice before you try to launch Windows.
      Another useful trick is to write a WIN.BAT file for the host computer that will display a message if you try to run Windows on the remote machine. Your batch file might look something like this:

CLS
ECHO IF YOU ARE OPERATING REMOTELY, WINDOWS WILL LOCK UP THIS SYSTEM.
ECHO PRESS CTRL-BREAK TO ABORT!
PAUSE
C:\WINDOWS\WIN